Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update New-AzGalleryImageDefinition.md to have correct values for SecurityType #26428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cocallaw
Copy link

@cocallaw cocallaw commented Oct 22, 2024

Correcting one value of SecurityType inputs list from TrustedandConfidentialVMSupported TrustedLaunchAndConfidentialVmSupported

Description

The current documentation lists the values that you can be used when specifying the SecurityType of the Image Definition being created with New-AzGalleryImageDefinition. One of the options provided in the list is “TrustedandConfidentialVMSupported”, this value is incorrect and should be “TrustedLaunchAndConfidentialVmSupported” instead

If the current incorrect value listed "TrustedandConfidentialVMSupported" is used, the cmdlet will fail with the following error message:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-resource: Microsoft.Compute/CreateUpdateGalleryImage3Min;149,Microsoft.Compute/CreateUpdateGalleryImage30Min;749
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-served-by                : 8b696ac9-8bc5-4ed8-9bcc-f233cc5f9a6c_133559636065873734,8b696ac9-8bc5-4ed8-9bcc-f233cc5f9a6c_133559636065873734
x-ms-request-id               : 717d882f-023b-45b9-8845-97c378047d9e
x-ms-ratelimit-remaining-subscription-writes: 199
x-ms-ratelimit-remaining-subscription-global-writes: 2999
x-ms-correlation-request-id   : 0a9f9db7-ea6d-4c7f-beb3-1d583593d736
x-ms-routing-request-id       : EASTUS:20241022T205053Z:0a9f9db7-ea6d-4c7f-beb3-1d583593d736
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: 526ACC05FC6344CBA40F88489CD3C3AE Ref B: MNZ221060619049 Ref C: 2024-10-22T20:50:53Z
Date                          : Tue, 22 Oct 2024 20:50:53 GMT

Body:
{
  "error": {
    "code": "InvalidParameter",
    "message": "The value 'TrustedandConfidentialVMSupported' for feature 'SecurityType' is invalid. Allowed characters are English alphanumerical characters with spaces and commas. The length of the value cannot exceed 100 characters.",
    "target": "galleryImage.properties.features"
  }
}


DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent:  Module: Az.Compute:8.4.0; CommandName: New-AzGalleryImageDefinition; PSVersion: 7.4.5; IsSuccess: True; Duration: 00:00:03.5228107; SanitizeDuration: 00:00:00
DEBUG: 8:50:53 PM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
DEBUG: 8:50:53 PM - NewAzureRmGalleryImage end processing.
DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [EnableErrorRecordsPersistence], Module = [], Cmdlet = []. Returning default value [False].
New-AzGalleryImageDefinition: The value 'TrustedandConfidentialVMSupported' for feature 'SecurityType' is invalid. Allowed characters are English alphanumerical characters with spaces and commas. The length of the value cannot exceed 100 characters.
ErrorCode: InvalidParameter
ErrorMessage: The value 'TrustedandConfidentialVMSupported' for feature 'SecurityType' is invalid. Allowed characters are English alphanumerical characters with spaces and commas. The length of the value cannot exceed 100 characters.
ErrorTarget: galleryImage.properties.features
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 717d882f-023b-45b9-8845-97c378047d9e
DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 8:50:53 PM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent:  Module: Az.Compute:8.4.0; CommandName: New-AzGalleryImageDefinition; PSVersion: 7.4.5; IsSuccess: False; Duration: 00:00:03.5228107; SanitizeDuration: 00:00:00; Exception: The value 'TrustedandConfidentialVMSupported' for feature 'SecurityType' is invalid. Allowed characters are English alphanumerical characters with spaces and commas. The length of the value cannot exceed 100 characters.
ErrorCode: InvalidParameter
ErrorMessage: The value 'TrustedandConfidentialVMSupported' for feature 'SecurityType' is invalid. Allowed characters are English alphanumerical characters with spaces and commas. The length of the value cannot exceed 100 characters.
ErrorTarget: galleryImage.properties.features
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 717d882f-023b-45b9-8845-97c378047d9e;
DEBUG: 8:50:53 PM - NewAzureRmGalleryImage end processing.

The proper value of "TrustedLaunchAndConfidentialVmSupported" can also be seen when viewing the generated ARM template by the Azure Portal when reviewing an Image Definition that was created through the portal and selecting Trusted Launch and Confidential VM Supported as the Security type.

image

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Correcting one value of SecurityType inputs list from TrustedandConfidentialVMSupported TrustedLaunchAndConfidentialVmSupported
Copy link

azure-client-tools-bot-prd bot commented Oct 22, 2024

️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help Example Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant